# Note: quotes are needed around the application command if it contains spaces. Customize the variables "quit" and "extracommand" for your application.
# On first call, a fifo pipe is created in /tmp and the target application is started in the background and set up to continuously get input from the fifo ("server mode"). On subsequent calls, input from STDIN is passed to the application. Any input given on the first call is also passed to the application.
# The fifo pipe is named according to the username and application name. Existence of the pipe is taken as a sign that the "server" is up and running. By definition, only one session can be run by one user on one machine.
# The pipe should be removed when the target application quits. This can be done by "trap" function which is a bash built-in but it may not be available under other shells.
# Option "-stop" explicitly removes the pipe and stops the server: